package com.huse.pigservice.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.huse.pigservice.entity.Pig;
import com.huse.pigservice.entity.PigType;
import com.huse.pigservice.mapper.PigMapper;
import com.huse.pigservice.service.PigService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xinxin
 * @since 2021-05-26
 */
@Service
public class PigServiceImpl extends ServiceImpl<PigMapper, Pig> implements PigService {

    @Override
    public Page<Pig> getPage(Page<Pig> page, Wrapper wapper) {
        baseMapper.selectPage(page,wapper);
        return page;
    }

    @Override
    public List<PigType> getPigTypeList() {
        return baseMapper.getPigType();
    }

    @Override
    public List<Pig> getPigTree() {
        return baseMapper.getPigTree();
    }
}
